public class ConcreteDecoratorRecord extends Decorator {

    public ConcreteDecoratorRecord(Component component) {
        this.setComponent(component);
    }

    @Override
    public String operation(){
        // 上层操作的返回值
        String superContent = super.operation();
        // 这里在上层操作的返回值外面使用<record>包装
        return "<record>\n"+superContent+"</record>\n";
    }

}
